# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.FusionTables.V2.Model.StyleSetting do
  @moduledoc """
  Represents a complete StyleSettings object. The primary key is a combination of the tableId and a styleId.

  ## Attributes

  *   `kind` (*type:* `String.t`, *default:* `fusiontables#styleSetting`) - The kind of item this is. A StyleSetting contains the style definitions for points, lines, and polygons in a table. Since a table can have any one or all of them, a style definition can have point, line and polygon style definitions.
  *   `markerOptions` (*type:* `GoogleApi.FusionTables.V2.Model.PointStyle.t`, *default:* `nil`) - Style definition for points in the table.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Optional name for the style setting.
  *   `polygonOptions` (*type:* `GoogleApi.FusionTables.V2.Model.PolygonStyle.t`, *default:* `nil`) - Style definition for polygons in the table.
  *   `polylineOptions` (*type:* `GoogleApi.FusionTables.V2.Model.LineStyle.t`, *default:* `nil`) - Style definition for lines in the table.
  *   `styleId` (*type:* `integer()`, *default:* `nil`) - Identifier for the style setting (unique only within tables).
  *   `tableId` (*type:* `String.t`, *default:* `nil`) - Identifier for the table.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :kind => String.t(),
          :markerOptions => GoogleApi.FusionTables.V2.Model.PointStyle.t(),
          :name => String.t(),
          :polygonOptions => GoogleApi.FusionTables.V2.Model.PolygonStyle.t(),
          :polylineOptions => GoogleApi.FusionTables.V2.Model.LineStyle.t(),
          :styleId => integer(),
          :tableId => String.t()
        }

  field(:kind)
  field(:markerOptions, as: GoogleApi.FusionTables.V2.Model.PointStyle)
  field(:name)
  field(:polygonOptions, as: GoogleApi.FusionTables.V2.Model.PolygonStyle)
  field(:polylineOptions, as: GoogleApi.FusionTables.V2.Model.LineStyle)
  field(:styleId)
  field(:tableId)
end

defimpl Poison.Decoder, for: GoogleApi.FusionTables.V2.Model.StyleSetting do
  def decode(value, options) do
    GoogleApi.FusionTables.V2.Model.StyleSetting.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.FusionTables.V2.Model.StyleSetting do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
